<!DOCTYPE html>
    <head>
        <meta charset="utf-8" />
        <meta name="format-detection" content="telephone=no" />
        <meta name="msapplication-tap-highlight" content="no" />
        <meta name="viewport" content="width=device-width ,initial-scale=1.0">
        <link rel="stylesheet" type="text/css" href="css/index.css" />
        <link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.4.5.css">
        <script src="js/jquery-2.1.4.js"></script>
        <script src="js/jquery.mobile-1.4.5.js"></script>
        <script>
            $(function(){

                $("#confirm").click(function(){
                    var username=$("#username").val();
                    var password=$("#password").val();

                    var user=JSON.parse(localStorage[username]);

                    console.log(user.name);
                    console.log(user.password);
                    if(user.name==username&&user.password==user.password){
                      /*  $.mobile.changePage("album.html?username="+$("#username").val(),
                                { type: "GET",
                                    data: $("#username").serialize()
                                },
                                "pop", false, false
                        )*/
                        window.location.href="album.html?username="+$("#username").val();
                    }
                });
            })

        </script>
        <title>登录</title>
    </head>
    <body>
    <div data-role="page">
        <div data-role="header" data-position="fixed" data-tap-toggle="false">
            <h1>登录</h1>
        </div>
        <div data-role="content">
            <form id="login">
                <div data-role="fieldcontail">

                    <label for="username">用户名：</label>
                    <input type="text" name="username" id="username">
                    <label for="password">密码</label>
                    <input type="password" name="password" id="password">
                    <a href="register.html" data-ajax="false">注册</a>
                    <input type="button" id="confirm" value="确认">
                    <input type="reset" value="取消">

                </div>
            </form>
        </div>

        <div data-role="footer" data-position="fixed" data-tap-toggle="false">
            <h1>RJ.lesson.lrj&hzs</h1>
        </div>
    </div>

    </body>
</html>
